package com.zhiwang.planet.ui.my;

import android.os.Bundle;

import androidx.databinding.DataBindingUtil;

import com.zhiwang.planet.R;
import com.zhiwang.planet.databinding.ActivityTradingMarketBinding;
import com.zhiwang.planet.di.component.DaggerUserComponent;
import com.zhiwang.planet.di.module.AccountModule;
import com.zhiwang.planet.di.module.AutoDisposeModule;
import com.zhiwang.planet.mvvm.viewmodel.my.ExChangeViewModel;
import com.zhiwang.planet.ui.BaseActivity;
import com.zhiwang.planet.util.Utils;

import org.jetbrains.annotations.Nullable;

import javax.inject.Inject;

public class TradingMarketActivity extends BaseActivity {


    @Override
    public void initInjection() {
        super.initInjection();

        DaggerUserComponent.builder()
                .accountModule(new AccountModule(this))
                .autoDisposeModule(new AutoDisposeModule(this))
                .appComponent(getAppComponent())
                .build()
                .inject(this);
    }


    @Inject
    ExChangeViewModel viewModel;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityTradingMarketBinding binding = DataBindingUtil.setContentView(this,R.layout.activity_trading_market);
        setSupportActionBar(findViewById(R.id.toolbar));
        Utils.setStatusBar(this, false, false);

        binding.setVm(viewModel);
        binding.setLifecycleOwner(this);

        viewModel.start();

    }
}
